<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="~{common/header :: commonHead}">
    <title>业态详情</title>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5 th:text="${null == editable ? '新增业态' : '编辑业态'}"></h5>
                    <div class="ibox-tools">
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="row form-body form-horizontal m-t" method="post" th:action="${null == editable ? '/commercial/add' : '/commercial/edit'}">
                        <input name="id" th:value="${editable?.id}" style="display: none">
                        <div class="col-md-12 droppable sortable ui-droppable ui-sortable">
                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">业态名称：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="name" class="form-control" required="required" th:value="${editable?.name}" placeholder="请输入业态名称">
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">业态顺序：</label>
                                <div class="col-sm-6">
                                    <input onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"   name="sortOrder" class="form-control" th:value="${editable?.sortOrder }" placeholder="请输入业态顺序" required="required">
                                </div>
                            </div>

                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">业态每积分价值：</label>
                                <div class="col-sm-6">
                                    <input onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"   id="percent_id" name="percent" class="form-control" th:value="${editable?.percent }" placeholder="请输入业态每积分价值 (例：此业态消费10元积1分，此项即输入10)" required="required">
                                </div>
                            </div>


                            <div class="form-group draggable ui-draggable dropped" style="position: static;">
                                <label class="col-sm-3 control-label">是否展示：</label>
                                <div class="col-sm-6">
                                    <label class="radio-inline">
                                        <input type="radio" th:checked="${editable?.statusShow == 0 || editable == null}" value="0" name="statusShow">是
                                    </label>
                                    <label class="radio-inline">
                                        <input type="radio" th:checked="${editable?.statusShow == 1}" value="1" name="statusShow">否
                                    </label>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>

                            <div class="form-group draggable ui-draggable">
                                <div class="col-sm-12 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                </div>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>



</script>
</body>
</html>